using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerWallClimbState : PlayerTouchingWallState
{
    public PlayerWallClimbState(Player player, PlayerMoveData playerData, StateMachine stateMachine, string animBoolName) : base(player, playerData, stateMachine, animBoolName)
    {
    }

    public override void LogicUpdate()
    {
        base.LogicUpdate();

        player.SetVelocityY(playerData.wallClimbVelocity * yInput);

        if (yInput == -1)
        {
            stateMachine.ChangeState(player.WallSlideState);
        }
        else if(yInput == 0)
        {
            stateMachine.ChangeState(player.WallGrabState);
        }
        else if (jumpInput)
        {
            stateMachine.ChangeState(player.WallNegativeJumpState);
        }
    }
}
